<?php
/**
 * Created by PhpStorm.
 * User: wmm
 * Date: 2018/9/17
 * Time: 13:43
 */
//数据库的连接
define("DBHOST","localhost");
define("DBPORT","3307");
define("DBUSER","root");
define("DBPWO","");
define("DBNAME","hpeu");




function getDBConn(){
    $dblink = new PDO("mysql:host=".DBHOST.";port=".DBPORT.";dbname=".DBNAME."", DBUSER, DBPWO,
        array(PDO::MYSQL_ATTR_INIT_COMMAND=>"set names utf8"));;
    $dblink->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    return $dblink;
}
?>